FROM debian:stretch
LABEL maintainer="caiweili <hellomrpc@126.com>"

RUN apt-get update \
    && apt-get install -y gnupg \
    && apt-key adv --keyserver keyserver.ubuntu.com --recv B6391CB2CFBA643D \
    && echo "deb http://zeroc.com/download/Ice/3.7/debian9 stable main" >> /etc/apt/sources.list.d/ice.list \
    && apt-get update \
    && apt-get install --no-install-recommends --no-install-suggests -y zeroc-icegrid

EXPOSE 4061 4062

VOLUME ["/var/lib/ice/icegrid"]
VOLUME ["/etc/icegrid"]

ENTRYPOINT ["/usr/bin/icegridregistry", "--Ice.Config=/etc/icegrid/registry.cfg"]